<template>
    <div class="positionR overhidden wrap">
      <ke-header></ke-header>
      <div :style="{minHeight:height,position:'relative',marginTop:'70px'}">
        <ke-slide class="left"></ke-slide>
        <div class="content1 left" :style="{width: (w-17)+'px'}">
          <router-view/>
        </div>
        <div :style="{clear:'both'}"></div>
      </div>
    </div>
</template>
<script type="text/ecmascript-6">
    import axios from 'axios'
    import KeHeader from "@/components/Header.vue"
    import KeSlide from "@/components/Slide.vue"
    export default {
      name:"Index",

        data() {
            return {
              w:774,
              screenWidth:document.body.clientWidth,
              height:""
            }
        },
      components:{
        KeHeader,
        KeSlide,
      },
      mounted(){
        const _this = this;
        window.screenWidth = document.body.clientWidth;
        if((parseInt(window.screenWidth)-250)>774){
          _this.screenWidth = parseInt(window.screenWidth)-250;
        }else{
          _this.screenWidth = 774;
        }
        window.onresize=()=>{
          return (()=>{
            window.screenWidth = document.body.clientWidth;
            if((parseInt(window.screenWidth)-250)>774){
              _this.screenWidth = parseInt(window.screenWidth)-250;
            }else{
              _this.screenWidth = 774;
            }
          })()
        }
        var h = document.body.clientHeight;
        this.height = parseInt(h-70)+"px";
        this.$router.push({path:"/home"});
        this.init();
      },
      watch:{
        screenWidth(val){
//          console.log(val)
          this.w = val;
        }
      },
      methods:{
        init(){
          var w = this.screenWidth;
          if((parseInt(w)-250)>774){
            this.w = parseInt(w)-250;
          }else{
            this.w = 774;
          }
        },
      }
    }
</script>

<style>
  .wrap{
    min-width: 1024px;
  }
  .content1{
    margin-left: 250px;
    padding: 30px;
    float: left;
    height: 100%;
    min-width: 774px;
    overflow-y: auto;
  }
  .ModelInputTitle{
    display:inline-block;
    width: 80px;
    text-align: center;
  }
  .formRow{
    /*height: 38px;*/
    /*line-height: 38px;*/
  }
  .rightRow{
    text-align: right
  }
  .leftRow{
    text-align: left;padding-left: 5px
  }
  .ivu-table{
    width: 100%;
  }
</style>
